package com.itheima.controller;


import com.itheima.common.R;
import com.itheima.domain.OmsCompanyAddress;
import com.itheima.manager.OmsCompanyAddressManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 收货地址
 */
@RestController
@CrossOrigin(origins = "*")
public class OmsCompanyAddressController {

    @Autowired
    OmsCompanyAddressManager omsCompanyAddressManager;

    //获取所有收货地址
    @GetMapping("/companyAddress/list")
    public R list(){
        List<OmsCompanyAddress> list=omsCompanyAddressManager.lists();
        return R.success(list);
    }
}

